﻿/// <reference path="../GeneratedArtifacts/viewModel.js" />

//*** 删除 Begin ***//
myapp.EditGroup.DelectSite_execute = function (screen) {
    screen.getSiteCollection().then(function (sites) {
        // Delete selected
        sites.deleteSelected();

        // Save changes
        myapp.commitChanges().then(null, function fail(e) {
            // If error occurs, show the error.
            msls.showMessageBox(e.message, { title: e.title }).then(function () {
                // Cancel Changes
                myapp.cancelChanges();
                throw e;
            });
        });
    });
};
//*** 删除 End ***//